<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    </head>
    <body>
        <div style="float: left; padding: 8px;width: 99%;background-color: #1ab394; height: 40px;">
            <label style="background-color: white;display: inline-block;max-width: 90%;margin-bottom: 5px;font-weight: 700;padding: 6px 12px;">
                <span style="color:green;margin-top: 50px;">用例数: </span><span>{{ stat.testsRun }}</span><span> | </span>
                <span style="color:greenyellow;margin-top: 50px;">成功: </span><span>{{ stat.successes }}</span><span> | </span>
                <span style="color:red;margin-top: 50px;">失败: </span><span>{{ stat.failed }}</span><span> | </span>
                <span style="color:lightcoral;margin-top: 50px;">跳过: </span><span style="width: 200px">{{ stat.skipped }}</span>
            </label>
            <p style="float:right">时间: {{ time }}</p>
        </div>
        <table style="width: 100%;border-collapse: collapse;text-align: left">
            <thead>
                <tr>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">编号</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">业务线</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">执行数量</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">成功数量</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">跳过数量</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">交易类型</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">测试结果</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">测试说明</th>
                    <th style="color: #676a6c;background-color: #F5F5F6;border: 1px solid #ddd;padding: 8px;font-size: 15px;">测试详情</th>
                </tr>
            </thead>

            <tbody>
            {% for s in result %}
                {% if s %}
                <tr>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ loop.index }}</td>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.name }}</td>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.stat.testsRun }}</td>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.stat.successes }}</td>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.stat.skipped }}</td>
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.type }}</td>
                    {% if s.stat.testsRun ==  s.stat.successes %}
                        <td style="color: green;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">pass</td>
                    {% elif s.stat.testsRun ==  s.stat.skipped %}
                        <td style="color:lightcoral;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">block</td>
                    {% else %}
                        <td style="color: red;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">failed</td>
                    {% endif %}
                    <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">{{ s.failed_reason }}</td>
                    {% if s.report_path %}
                        <td style="color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;"><a href="http://20.1.1.210:9000/ui/view_report/?report_path={{ s.report_path }}">测试报告</a></td>
                    {% else %}
                        <td style="float: inherit; color: darkolivegreen;font-size: 14px;background-color: #fff;border: 1px solid #ddd;padding: 8px;">--</td>
                    {% endif %}
                </tr>
                {% endif %}
            {% endfor %}
            </tbody>
        </table>
    </body>
</html>